/**
 * Generate time : 2011-11-11 5:34:15
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEEquipmentRunRecord table comment : 设备运行记录
 */
public class ZMCEEquipmentRunRecord extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdProductionUnitsId = " "; /* 生产单元ID */
	private String fdProductionUnitsName = " "; /* 生产单元名称 */
	private String fdEquipmentId = " ";		/* 设备卡片ID*/
	private String fdEquipmentCode = " "; /* 设备编号 */
	private String fdEquipmentName = " "; /* 设备名称 */
	
	private String fdStartClock = " "; /* 开机时刻 */
	private String fdStopClock = " "; /* 停机时刻 */
	private String fdRunTime = " "; /* 运行时长(M) */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitsId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产单元ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitsName");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产单元名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);	
		eiColumn.setDescName("设备卡片ID");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdEquipmentCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("设备编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("设备名称");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdStartClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("开机时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStopClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("停机时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRunTime");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("运行时长(M)");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEEquipmentRunRecord() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdProductionUnitsId - 生产单元ID
	 * 
	 * @return the fdProductionUnitsId
	 */
	public String getFdProductionUnitsId() {
		return this.fdProductionUnitsId;
	}

	/**
	 * set the fdProductionUnitsId - 生产单元ID
	 */
	public void setFdProductionUnitsId(String fdProductionUnitsId) {
		this.fdProductionUnitsId = fdProductionUnitsId;
	}

	/**
	 * get the fdProductionUnitsId - 生产单元
	 * 
	 * @return the fdProductionUnitsId
	 */
	public String getFdProductionUnitsName() {
		return this.fdProductionUnitsName;
	}

	/**
	 * set the fdProductionUnitsId - 生产单元
	 */
	public void setFdProductionUnitsName(String fdProductionUnitsName) {
		this.fdProductionUnitsName = fdProductionUnitsName;
	}
	
	/**
	 * get the fdEquipmentId - 设备卡片ID
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}
	
	/**
	 * set the fdEquipmentId - 设备卡片ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}
	
	/**
	 * get the fdCode - 设备编号
	 * 
	 * @return the fdCode
	 */
	public String getFdEquipmentCode() {
		return this.fdEquipmentCode;
	}

	/**
	 * set the fdCode - 设备编号
	 */
	public void setFdEquipmentCode(String fdEquipmentCode) {
		this.fdEquipmentCode = fdEquipmentCode;
	}

	/**
	 * get the fdName - 设备名称
	 * 
	 * @return the fdName
	 */
	public String getFdEquipmentName() {
		return this.fdEquipmentName;
	}

	/**
	 * set the fdName - 设备名称
	 */
	public void setFdEquipmentName(String fdEquipmentName) {
		this.fdEquipmentName = fdEquipmentName;
	}
	
	/**
	 * get the fdStartClock - 开机时刻
	 * 
	 * @return the fdStartClock
	 */
	public String getFdStartClock() {
		return this.fdStartClock;
	}

	/**
	 * set the fdStartClock - 开机时刻
	 */
	public void setFdStartClock(String fdStartClock) {
		this.fdStartClock = fdStartClock;
	}

	/**
	 * get the fdStopClock - 停机时刻
	 * 
	 * @return the fdStopClock
	 */
	public String getFdStopClock() {
		return this.fdStopClock;
	}

	/**
	 * set the fdStopClock - 停机时刻
	 */
	public void setFdStopClock(String fdStopClock) {
		this.fdStopClock = fdStopClock;
	}

	/**
	 * get the fdRunTime - 运行时长(M)
	 * 
	 * @return the fdRunTime
	 */
	public String getFdRunTime() {
		return this.fdRunTime;
	}

	/**
	 * set the fdRunTime - 运行时长(M)
	 */
	public void setFdRunTime(String fdRunTime) {
		this.fdRunTime = fdRunTime;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdProductionUnitsId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitsId")), fdProductionUnitsId));
		setFdEquipmentCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentCode")), fdEquipmentCode));
		setFdProductionUnitsName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitsName")), fdProductionUnitsName));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));		
		setFdEquipmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentName")), fdEquipmentName));
		setFdStartClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStartClock")), fdStartClock));
		setFdStopClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStopClock")), fdStopClock));
		setFdRunTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRunTime")), fdRunTime));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdProductionUnitsId", StringUtils.toString(fdProductionUnitsId, eiMetadata.getMeta("fdProductionUnitsId")));
		map.put("fdProductionUnitsName", StringUtils.toString(fdProductionUnitsName, eiMetadata.getMeta("fdProductionUnitsName")));
		map.put("fdEquipmentCode", StringUtils.toString(fdEquipmentCode, eiMetadata.getMeta("fdEquipmentCode")));			
		map.put("fdEquipmentName", StringUtils.toString(fdEquipmentName, eiMetadata.getMeta("fdEquipmentName")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdStartClock", StringUtils.toString(fdStartClock, eiMetadata.getMeta("fdStartClock")));
		map.put("fdStopClock", StringUtils.toString(fdStopClock, eiMetadata.getMeta("fdStopClock")));
		map.put("fdRunTime", StringUtils.toString(fdRunTime, eiMetadata.getMeta("fdRunTime")));

		return map;

	}
}